import request from '../utils/request' //引入axios的封装方法
import cfg from '@/config/config'

const reservationApi = {
  // 查询访客预约记录
  findVisitList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/findVisitList', params)
  },
  // 获取实时访客数据
  getVisitorVisitCase: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorVisitCase', params)
  },
  // 获取太仓实时访客数据
  getVisitStatistics: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitStatisticsAreaOrDoor', params)
  },
  // 获取各预约状态总数与各基地实时访客数据【新】
  getStatistics: (params) => {
    return request('post', cfg.apiUrl + 'api/statistics/getStatistics', params)
  },
  // 按月查询访客数据--柱状图数据
  getVisitorVisitGraphs: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorVisitGraphs', params)
  },
  // 查询视频观看记录
  findVisitWatchLogList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitVideo/findVisitWatchLogList', params)
  },



  // 访客单位访问统计--查询数据
  getVisitorUnitList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorUnitList', params)
  },
  // 访客单位人次统计--查询数据
  getVisitorUnitManTimeList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorUnitManTimeList', params)
  },
  // 获取所有部门
  getDtdepList: () => {
    return request('get', cfg.apiUrl + 'api/visitor/getDtdepList')
  },
  // 获取所有访客单位名称
  getVisitCompanyList: () => {
    return request('get', cfg.apiUrl + 'api/visitor/getVisitCompanyList')
  },

  // 获取访客类型，// 参数 208
  getBdSysItemTypeList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getBdSysItemList', params)
  },
  // 获取基地，// 参数 200
  getBdSysItemList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getBdSysItemListByRole', params)
  },
  // 查询区域列表，参数基地id
  getVisitorTypeAreaList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getBdVisitAreaListByRole', params)
  },
  // 查询区域列表，参数基地id【新20220330】
  getBdVisitAreaListByRoleNew: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getBdVisitAreaListByRoleNew', params)
  },
  // 查询门列表，参数区域id
  getSysItemByArea: (params) => {
    return request('post', cfg.apiUrl + 'api/item/getSysItemByArea', params)
  },
  // 查询部门列表，参数基地区域id
  getDepByBaseAndArea: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getDepByBaseAndArea', params)
  },
  // 查询访客类型，参数区域id
  getVisitorsType: (params) => {
    return request('post', cfg.apiUrl + 'api/item/getTypeByAreaOrByDoor', params)
  },
  // 获取访客明细图片
  getAttachmentNameList: (params) => {
    return request('get', cfg.apiUrl + 'api/visitor/getAttachmentNameList', params)
  },


  // 被访者部门人次统计
  getDtDepManTimeList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getDtDepManTimeList', params)
  },


// 车辆明细
  findSmartCartempList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/findSmartCartempList', params)
  },
  // 获取车位实时数据
  getVehicleUsage: () => {
    return request('get', cfg.apiUrl + 'api/visitor/getVehicleUsage')
  },
  // 获取车位查询数据--柱状图数据
  getVehicleUsageGraph: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVehicleUsageGraph', params)
  },


  // 车辆权限管理-查询
  findDtAllcarsqList: (params) => {
    return request('post', cfg.apiUrl + 'api/parkingLot/findDtAllcarsqList', params)
  },
  // 车辆权限管理-新增，修改
  savaDtAllcarsq: (params) => {
    return request('post', cfg.apiUrl + 'api/parkingLot/savaDtAllcarsq', params)
  },
  // 获取车辆类型
  getVehicleTypeList: () => {
    return request('GET', cfg.apiUrl + 'api/parkingLot/getVehicleTypeList')
  },
  // 车辆权限管理-删除
  deleteDtAllcarsq: (params) => {
    return request('post', cfg.apiUrl + 'api/parkingLot/deleteDtAllcarsq', params)
  },


  // 车辆类型
  getDtAllcarsqLxs: () => {
    return request('get', cfg.apiUrl + 'api/visitor/getDtAllcarsqLxs')
  },

  // 基地
  getSmartPositionBdQys: () => {
    return request('get', cfg.apiUrl + 'api/visitor/getSmartPositionBdQys')
  },

  // 根据基地获取停车场
  getCarParkDate: (params) => {
    return request('post', cfg.apiUrl + 'api/parkingLot/getParkInfoList', params)
  },
  // 获取车辆进出明细图片
  getBdParkInOutPhoto: (params) => {
    return request('get', cfg.apiUrl + 'api/parkingLot/getBdParkInOutPhoto?dataItems='+ params)
  },



};

export default reservationApi;
